package com.yuw.service.impl;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;

import com.yuw.bean.AdminInfoBean;
import com.yuw.db.DBProvider;
import com.yuw.service.ILoginService;
import com.yuw.utils.MyUtils;

public class LoginServiceImpl implements ILoginService {

	@Override
	public List<AdminInfoBean> queryLoginInfo(AdminInfoBean adminB) {
		// 调用db层进行数据库操作
		// 登录查询语句
		String sql = "select * from admininfo where adminName = ? and adminpsw= ? ";
		// 调用db层进行数据库查询操作
		List<AdminInfoBean> lstAdmins = MyUtils.getInstance(DBProvider.class).query(sql,
				new BeanListHandler<>(AdminInfoBean.class), adminB.getAdminname(), adminB.getAdminpsw());
		// 返回结果
		return lstAdmins;
	}

}
